package org.example.shop;
import java.util.HashMap;
import java.util.Scanner;
public class Manager {

        private String accountNum;
        private String code;

        public void changeMyCode(String code) {
            this.code = code;
        }

        public void changeCustomerCode(HashMap<String, Customer> customerMap) {System.out.println("请输入用户名和新密码");
            Scanner sc = new Scanner(System.in);
            String name = sc.next();
            String code = sc.next();
            if (customerMap.get(name) == null) {
                System.out.println("用户不存在");
            } else {
                customerMap.get(name).setCustomerCode(code);
                System.out.println("修改成功");
            }
        }

        public Manager(String accountNum, String code) {
            this.accountNum = accountNum;
            this.code = code;
        }

        public Manager() {
        }

        public String getAccountNum() {
            return accountNum;
        }

        public void setAccountNum(String accountNum) {
            this.accountNum = accountNum;
        }

        public String getCode() {
            return code; }

        public void setCode(String code) {
            this.code = code;
        }
    }

